const scroll = {
    foo:null,
    fn1:function(fn){
        this.foo = ()=>{
            let scrollTop = document.documentElement.scrollTop || document.body.scrollTop
            if (scrollTop + document.documentElement.clientHeight >= document.documentElement.scrollHeight) {
                fn()
                console.log('界面滚动');
            }
        }
        window.addEventListener('scroll',this.foo)
    },
    fn2:function(){
        window.removeEventListener("scroll",this.foo);
    }
}
export default scroll
